<!--
        *后台商品修改页面
        * 
        *
        * @author     3+1项目组.hzy
        * @version    2018-02-03 21:12    
-->
{extend name="AdminPublic:public"}
{block name="admin"}
 <html>
 <head></head>
 <script type="text/javascript" charset="utf-8" src="/public/static/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/public/static/ueditor/ueditor.all.min.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="/public/static/admins/ueditor/lang/zh-cn/zh-cn.js"></script>
 <body>
  <div class="mws-panel grid_8"> 
   <div class="mws-panel-header"> 
    <span>商品修改</span> 
   </div> 
   <div class="mws-panel-body no-padding"> 
    <form class="mws-form" action="/goods/update" method="post" enctype="multipart/form-data"> 
     <div class="mws-form-inline"> 
      <div class="mws-form-row"> 
       <label class="mws-form-label">商品名称</label> 
       <div class="mws-form-item"> 
        <input type="text"  name="name" class="large" value="{$info['name']}" /> 
       </div> 
      </div>
      <div class="mws-form-row">
        <label class="mws-form-label">商品图片</label>
        <div class="mws-form-item">
                         <img src="{$info.pic}" style="height:50px;">
                         <input type="hidden" name="pic" value="{$info.pic}">
          <input type="file" class="small" name="pics" value="">
        </div>
      </div>
      <div class="mws-form-row"> 
       <label class="mws-form-label">品牌</label> 
       <div class="mws-form-item"> 
        <select class="large" name="class_id">
            <option value="0">--请选择---</option>
            {foreach name="data" item="row"}
            <option value="{$row['id']}" {if condition="$row['id'] eq $info['brands_id']"}selected{/if}>{$row['name']}</option>
            {/foreach}
        </select>
       </div> 
      </div> 
      <div class="mws-form-row">
        <label class="mws-form-label">商品状态</label>
        <div class="mws-form-item clearfix">
             <ul class="mws-form-list inline">
                  <li><input type="radio" value="0" {if condition="($info.status==0)"}checked{/if} name="status"> <label>下架</label></li>
                  <li><input type="radio" value="1" {if condition="($info.status==1)"}checked{/if} name="status"> <label>上架</label></li>
             </ul>
        </div>
      </div> 
      <div class="mws-form-row"> 
       <label class="mws-form-label">商品颜色</label> 
       <div class="mws-form-item"> 
        <input type="text"  name="color" class="large" value="{$info['color']}" /> 
       </div> 
      </div>
      <div class="mws-form-row"> 
       <label class="mws-form-label">商品尺寸</label> 
       <div class="mws-form-item"> 
        <input type="text"  name="size" class="large" value="{$info['size']}" /> 
       </div> 
      </div>
      <div class="mws-form-row"> 
       <label class="mws-form-label">商品库存</label> 
       <div class="mws-form-item"> 
        <input type="text"  name="store" class="large" value="{$info['store']}" /> 
       </div> 
      </div>
      <div class="mws-form-row"> 
       <label class="mws-form-label">商品价格</label> 
       <div class="mws-form-item"> 
        <input type="text"  name="price" class="large" value="{$info['price']}" /> 
       </div> 
      </div>
      <div class="mws-form-row"> 
       <label class="mws-form-label">商品详情</label> 
       <div class="mws-form-item"> 
        <script id="editor" type="text/plain"  name="content" style="width:900px;height:500px;">{$info['content']}</script>
       </div> 
      </div> 
     </div> 
     <div class="mws-button-row">
      <input type="hidden" name="id" value="{$info['id']}"> 
      <input type="submit" value="修改" class="btn btn-danger" /> 
      <input type="reset" value="重置" class="btn " /> 
     </div> 
    </form> 
   </div> 
  </div>
 </body>
 <script type="text/javascript">
 //实例化编辑器
 //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
 var ue = UE.getEditor('editor');
  </script>
</html>
{/block}
{block name="title"}后台商品修改{/block}